<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1>标题</h1>
		<p id="p01">
			段落内容<br />
			<span>内容1</span>
			<span>内容2</span>
		</p>
		
		
		<script>
			
			//DOM Document <object> modek
			window.onload = function()
			{
				//
				console.log("节点的名字:"+document.body.nodeName);
				// body
				console.log("节点的类型:"+document.body.nodeType);
				// 1       元素节点
				console.log("节点的值:"+document.body.nodeValue);
				// null
				
				
				console.log("子节点:"+document.body.childNodes);
				console.log("子节点:"+document.body.childNodes.length);
			
				
				console.log("p01节点名字"+p01.nodeName)
				console.log("p01节点类型"+p01.nodeType)
				console.log("p01节点值"+p01.nodeValue)
				console.log("p01子元素的数量"+p01.childNodes.length)
				// 7个子元素 标签是子元素 文本也是子元素
			
			
			
			
			}
		
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		</script>
	</body>
</html>
